package com.springbootmybatis.service.impl;

import com.springbootmybatis.dao.DeptDao;
import com.springbootmybatis.entity.Dept;
import com.springbootmybatis.service.DeptService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {

    @Resource
    DeptDao deptDao;

    @Override
    public List<Dept> getDeptList() {
        return deptDao.getDeptList();
    }

    @Override
    public void add(Dept dept) {
        deptDao.insert(dept);
    }

    @Override
    public void update(Dept dept) {
        deptDao.update(dept);
    }

    @Override
    public void deleteById(Integer id) {
        deptDao.deleteById(id);
    }
}
